package com.sl.plugin.step.net;

import com.sl.core.engine.meta.ProcessCompDescriptorService;
import com.sl.core.engine.meta.impl.AbstractProcessCompDescriptor;
import com.sl.core.engine.meta.row.ProcessRowDescriptor;
import com.sl.core.engine.utils.BeanUtil;
import lombok.Getter;

import java.util.Map;

/**
 *
 */
@Getter
public class NetHttpCompDescriptor extends AbstractProcessCompDescriptor<
        NetHttpComp, NetHttpCompContext> implements ProcessCompDescriptorService {


    @Override
    public void loadDescriptor(Map<String, Object> map) {
        Map<String, Object> responseConfig =  BeanUtil.getMap(map, "config.responseConfig");
        buildResultProcessRowDescriptor(responseConfig);
    }


    @Override
    public ProcessRowDescriptor getResultDescriptor(ProcessRowDescriptor rowDescriptor) {
        ProcessRowDescriptor rowMeta = super.getResultRowDescriptor();
        return rowMeta;
    }

}
